package eai.tp2.lpco.web.beans;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import eai.tp2.lpco.database.DigitalCamera;

public class Result {

	Map<String, DigitalCamera> resultSet = new HashMap<String, DigitalCamera>();	
	
	public Result(List<DigitalCamera> camerasResult) 
	{
		for(DigitalCamera temp: camerasResult) {
			resultSet.put(temp.getModelName(), temp);
		}
	}
	
	public Set<String> getNames() {
		return resultSet.keySet();
	}
	
	public DigitalCamera getDigitalCamera(String name) {
		return resultSet.get(name);
	}

	public void remove(String name) {
		resultSet.remove(name);
	}
}
